<template>
  <ant-modal
    modalWidth="576"
    modalHeight="500"
    :visible="open"
    :modal-title="formTitle"
    :adjust-size="true"
    @cancel="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" slot="content" layout="vertical">
      <a-row :gutter="32">
        <a-col :span="12">
          <a-form-model-item label="${comment}" prop="ind">
            <a-input-number v-model="form.ind" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="${comment}" prop="inddoc">
            <a-input-number v-model="form.inddoc" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="姓名" prop="name">
            <a-input v-model="form.name" placeholder="请输入姓名"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="第一人名" prop="firstname">
            <a-input v-model="form.firstname" placeholder="请输入第一人名"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="第二人名" prop="patname">
            <a-input v-model="form.patname" placeholder="请输入第二人名"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="地址" prop="address">
            <a-input v-model="form.address" placeholder="请输入地址"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="性别" prop="pol">
            <a-input v-model="form.pol" placeholder="请输入性别"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="电话" prop="phone">
            <a-input v-model="form.phone" placeholder="请输入电话"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="年龄" prop="comment">
            <a-input v-model="form.comment" placeholder="请输入年龄"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="${comment}" prop="age">
            <a-input-number v-model="form.age" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="${comment}" prop="birthdate">
            <a-date-picker
              v-model="form.birthdate"
              valueFormat="YYYY-MM-DD"
              :show-today="true"
              placeholder="选择日期"
              style="width: 100%"
            />
          </a-form-model-item>
        </a-col>
        <a-col :span="12" >
          <a-form-model-item label="性别" prop="sex">
            <a-radio-group v-model="form.sex">
              <a-radio
                v-for="(dict, index) in sexOptions"
                :key="index"
                :value="dict.dictValue"
              >
                {{ dict.dictLabel }}
              </a-radio>
            </a-radio-group>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="${comment}" prop="clientid">
            <a-input-number v-model="form.clientid" :min="0" style="width: 100%"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="最后登录IP" prop="loginIp">
            <a-input v-model="form.loginIp" placeholder="请输入最后登录IP"/>
          </a-form-model-item>
        </a-col>
        <a-col :span="12">
          <a-form-model-item label="最后登录时间" prop="loginDate">
            <a-date-picker
              v-model="form.loginDate"
              valueFormat="YYYY-MM-DD"
              :show-today="true"
              placeholder="选择日期"
              style="width: 100%"
            />
          </a-form-model-item>
        </a-col>
      </a-row>
    </a-form-model>
    <template slot="footer">
      <a-button :disabled="disabled" @click="cancel">
        取消
      </a-button>
      <a-button type="primary" :disabled="disabled" @click="submitForm(true)">
        保存
      </a-button>
    </template>
  </ant-modal>
</template>
<script>
import PacientAddForm from './PacientForm'
export default {
  ...PacientAddForm
}
</script>
